﻿
Imports Microsoft.Windows.Design.Interaction
Imports System.Windows.Shapes
Imports Microsoft.Windows.Design.Policies

<UsesItemPolicy(GetType(WPFSearchDataGridPolicy))> _
Class WPFSearchDataGridAdornerProvider
    Inherits AdornerProvider

    Public Sub New()
        Dim _rectangle As New Rectangle
        With _rectangle
            .Width = 23.0
            .Height = 23.0
            .Fill = AdornerColors.GlyphFillBrush

            AdornerPanel.SetAdornerHorizontalAlignment(_rectangle, AdornerHorizontalAlignment.OutsideLeft)
            AdornerPanel.SetAdornerHorizontalAlignment(_rectangle, AdornerVerticalAlignment.OutsideTop)

            Dim _adornerpanel As New AdornerPanel
            _adornerpanel.Children.Add(_rectangle)

            AdornerPanel.SetTask(_rectangle, New WPFSearchDataGridHeaderVisibleTask())
            Adorners.Add(_adornerpanel)

        End With

    End Sub

End Class
